<?php
session_start();
include('../include/dbFunctions.php');

//Innitialization of variable
$table = 'sponsor';

//Retrieve data from POST
$sponsor_name = htmlspecialchars($_POST['sponsor_name']);
$sponsor_description = htmlspecialchars($_POST['sponsor_description']);
//Add data to database
$sQuery ='INSERT INTO sponsor(sponsor_name,sponsor_description)
VALUES ("'.$sponsor_name.'","'.$sponsor_description.'")';
    $sResult=executeQuery($sQuery);
    if($sResult!=0){
        $_SESSION['mes']="New sponsor has been added sucessfully.";
    }else{
        $_SESSION['mes']="Error! Please try again.";
    }
header('Location: sponsorManage.php');

?>
